package com.jsptpd.smartauth.modules.business.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.jsptpd.smartauth.modules.business.dao.db2.UserGsyMapper;
import com.jsptpd.smartauth.modules.business.model.UserGsy;
import com.jsptpd.smartauth.modules.business.service.IUserGsyService;

import org.springframework.stereotype.Service;

@Service
public class UserGsyServiceImpl extends ServiceImpl<UserGsyMapper, UserGsy> implements IUserGsyService
{
    @Override
    public int updateByPrimaryKey(String userId,String password) {
        UserGsy user = selectOne(new EntityWrapper<UserGsy>().eq("USERID", userId));

        if(user!=null){
            user.setPassword(password);
            update(user,new EntityWrapper<UserGsy>().eq("USERID", userId));
        }

        return 0;
    }
}
